1. Technical Field
The present invention relates to an improved data processing system. In particular, the present invention relates to improving data cache performance of a data processing system. Still more particularly, the present invention relates to improving data cache performance of a data processing system using inter-procedural strength reduction of global objects.
2. Description of Related Art
In a data processing system, data cache is part of the cache memory that interfaces between the processor and the main memory. Each time a piece of data, such as value of a variable, is requested, the processor attempts to locate the data in the data cache, prior to performing a look up in the main memory. Thus, the data cache stores data that is most frequently retrieved by the processor.
However, as the speed of the processor increases, the data random access memory (DRAM) or data cache latency also increases, since the processor can process requests much faster than the DRAM can handle. This makes improving data cache performance a priority for modern compiler design.
Two major types of approach have been introduced to optimize global data locality, which in turn improves data cache performance. One approach is using code transformations, which exploit spatial locality. This approach is performed during the code optimization phase of the compiler. Common code transformations include loop tiling, strip mining, and loop interchange. Another approach is using data layout transformations, which exploit data re-use. Common layout transformations include array padding and data reconstruction.
As mentioned in related patent application entitled “METHOD AND APPARATUS FOR OPTIMIZING SOFTWARE PROGRAM USING INTER-PROCEDURAL STRENGTH REDUCTION”, herein incorporated by reference, costly computations may be identified and replaced with less costly computations. In turn, the total number of computations in a software program is reduced inter-procedurally and the performance of the software program is enhanced.
However, a need exists for a solution that improves data cache utility with a given inter-procedural view of a program. Therefore, it would be advantageous to have an improved method and apparatus that can analyze the usage pattern of global objects in a software program and identifies opportunities for object compression, such that more cache efficient code may be generated.